<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>p3_CSS常用值</title>
    <style>
        h1 {
            /* rgb() 表示方法*/
            color: red;
            color: rgb(255,0,0);
            color: rgb(0,255,255);
            color: rgb(0,255,0);
            color: rgb(255,0,255);
            color: rgb(0,0,255);
            color: rgb(255,255,0);
            color: rgb(0,0,0);
            color: rgb(255,255,255);
            color: rgb(128,128,128);
            /* 十六进制表示法 #rrggbb*/
            color: #ff0000;
            color: #00ff00;
            color: #0000ff;
            color: #808080;
            color: #000000;
            color: #ffffff;
            /* 十六进制简写形式 #rgb*/
            color: #f00;
            color: #0f0;
            color: #00f;
            color: #808080;
            color: #000;
            color: #fff;
            /* rgba()表示法*/
            color: rgba(255,0,0,1);
            /*color: rgba(255,0,0,0.8);*/
            /*color: rgba(255,0,0,0.5);*/
            /*color: rgba(255,0,0,0.3);*/
            /*color: rgba(255,0,0,0);*/
        }
        .d1 {
            /*插入背景图必须设置所在区域的大小*/
            width: 50px;
            height: 100px;
            /*插入背景图*/
            background-image: url(img/mr.png);
            background-size: 50px 100px;
            background-color: #000;
        }
        .d2 {
            width: 500px;
            height: 300px;
            border: 5px solid red;
            background-image: url(img/mr.png);
            /* 设置背景图不允许重复 */
            background-repeat: no-repeat;
            background-position: -50px 0;/*向左*/
            background-position: 0 50px;/*向下*/
            background-position: -50px -50px;/*向左上*/
            background-position: 200px 50px;
            background-position: 100% 100%;/*（右下角）剩余可支配空间的百分比*/
            background-position: left top;
            background-position: right bottom;
            background-position: center center;
            background-position: center;/* 两个center简写成一个*/
        }
        .d3 {
            width: 500px;
            height: 300px;
            background-image: linear-gradient(30deg,red,orange,yellow);
        }
    </style>
</head>
<body>
    <h1>测试颜色</h1>
    <!-- .d*3 tab 补全，快速生成三个div-->
    <div class="d1"></div>
    <div class="d2"></div>
    <div class="d3"></div>
</body>
</html>